package com.swz.dcrm.ui;

import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.os.StrictMode;




import com.billy.android.loading.Gloading;
import com.bumptech.glide.Glide;
import com.swz.dcrm.R;
import com.swz.dcrm.adpter.GlobalAdapter;


import com.taobao.accs.utl.ALog;
import com.tencent.bugly.Bugly;



public class MyApplication extends Application {
    private static final String TAG = MyApplication.class.getName();
    private static String token;
    @Override
    public void onCreate() {
        super.onCreate();
        ALog.setUseTlog(false);
        Gloading.initDefault(new GlobalAdapter());
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
            StrictMode.setVmPolicy(builder.build());
        }
        Glide.with(getApplicationContext())
                .load(R.mipmap.loading);
        Bugly.init(getApplicationContext(), "b4d92a4308", true);
    }

    public static String getToken() {
        return token;
    }


    public static void setToken(String token) {
        MyApplication.token = token;
    }
}
